tem
<template>
  <el-tooltip class="item" effect="dark" content="搜索" placement="bottom-end">
    <el-popover
      placement="bottom-end"
      width="250"
      trigger="manual"
      :value="searchShow"
    >
      <div class="sort-btn" slot="reference">
        <el-button @click="showSearch" type="text"
          ><i class="el-icon-search"></i
        ></el-button>
      </div>
      <Search />
    </el-popover>
  </el-tooltip>
</template>
<script>
import Search from './index.vue'
import { mapMutations } from 'vuex'
export default {
  data() {
    return {
      flag: false,
    }
  },
  components: {
    Search,
  },
  methods: {
    ...mapMutations({
      setSearchShow: 'file/setSearchShow',
    }),
    showSearch() {
      this.setSearchShow()
    },
  },
  computed: {
    searchShow() {
      return this.$store.state.file.searchShow
    },
  },
  created() {
    this.setSearchShow(false)
  },
}
</script>
<style lang="scss" scoped>
.sort-btn {
  // margin-left: 15px;
  i {
    font-size: 18px;
  }
}
</style>
